<div id="element-box">	
	<div class="m">
		<div class="subNav">
			<ul>
				<li class="active">
					<div>
						<a title="" href="/admin/role"><?php echo $this->translate('admin_role_index_tab')?></a>
					</div>
				</li>
				<li>
					<div>
						<a title="" href="/admin/role/permission"><?php echo $this->translate('admin_role_permission_tab')?></a>
					</div>
				</li>								
			</ul>
		</div>		
		<?php echo $this->message; ?>
		<div class="head-title">
			<h3>
				<span>Quản lý nhóm / Danh sách</span>
			</h3>			
		</div>	

		<form method="post" action="" name="adminForm" id="adminForm">
			<fieldset id="filter-bar">
				<div class="filter-search fltlft">
					<label for="filter_keyword" class="filter-search-lbl"><?php echo $this->translate('admin_form_filter_keyword')?>: </label>
					<input type="text" title="Search" style="width: 200px"  id="filter_keyword" name="filter_keyword"
						 value="<?php echo isset($this->filterKeyword) ? $this->filterKeyword : '' ?>">
					<button type="submit">Search</button>
					<button
						onclick="document.id('filter_search').value='';this.form.submit();"
						type="button">Clear</button>
				</div>			
			</fieldset>
			<table class="adminlist">
				<thead>
					<tr>
						<th width="1%"><input type="checkbox"
							onclick="jForm.checkAll(this)" title="Check All" value=""
							name="checkall-toggle">
						</th>
						<th><?php echo $this->translate('admin_table_role')?></th>
						<th width="12%"><?php echo $this->translate('admin_table_created_date')?></th>	
						<th width="12%"><?php echo $this->translate('admin_table_created_by')?></th>					
						<th width="12%"><?php echo $this->translate('admin_table_modified_date')?></th>
						<th width="12%"><?php echo $this->translate('admin_table_modified_by')?></th>						
						<th width="120" class="nowrap"><?php echo $this->translate('admin_table_action')?></th>
					</tr>
				</thead>
	
				<tbody>	
					<?php
					$row = true; 
					foreach ($this->arrRole as $item) {
					?>
						<tr class="row<?php echo ($row) ? 0 : 1?>">
							<td class="center">
								<input type="checkbox" value="<?php echo $item['role_id']?>" name="cid[]" id="cb0">
							</td>							
							<td>								
								<a href="#"><b><?php echo $item['role_name']?></b></a>								
							</td>
							<td class="center"><?php echo date('d/m/Y H:i:s', strtotime($item['created_time']))?></td>							
							<td class="center">
								<?php echo isset($this->arrUser[$item['created_by']]) ? $this->arrUser[$item['created_by']]['username'] : 'Unknow'?>
							</td>
							<td class="center"><?php echo date('d/m/Y H:i:s', strtotime($item['updated_time']))?></td>		
							<td class="center">
								<?php echo isset($this->arrUser[$item['updated_by']]) ? $this->arrUser[$item['updated_by']]['username'] : 'Unknow'?>
							</td>						
							<td class="center">
								<a class="btnUpdate" href="/admin/role/edit/id/<?php echo $item['role_id']?>" title="<?php echo $this->translate('admin_table_action_edit')?>">
									<?php echo $this->translate('admin_table_action_edit')?>
								</a>
								<a class="btnUpdate" href="/admin/role/delete/id/<?php echo $item['role_id']?>" title="<?php echo $this->translate('admin_table_action_delete')?>">
									<?php echo $this->translate('admin_table_action_delete')?>
								</a>
							</td>
						</tr>
					<?php 
						$row = !$row;
					} 
					?>					
				</tbody>
			</table>	
		</form>
	</div>
</div>